import Main from './Main';
import Error from './views/Error';
import Login from './views/Login';
import Register from './views/Register';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';

const App = () => (
   <Router>
      <Switch>
         <Route path="/login" exact>
            <Login />
         </Route>
         <Route path="/register" exact>
            <Register />
         </Route>
         <Route path="/" component={Main} />
         <Route path="*" component={Error} />
      </Switch>
   </Router>
);

export default App;
